package com.sunny.entity;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "sun_system", schema = "crawler", catalog = "")
public class SunSystemEntity {
    private long sysId;
    private String sysKey;
    private String sysValue;
    private String keyType;
    private String keySubType;
    private String comment;

    @Id
    @Column(name = "sys_id")
    public long getSysId() {
        return sysId;
    }

    public void setSysId(long sysId) {
        this.sysId = sysId;
    }

    @Basic
    @Column(name = "sys_key")
    public String getSysKey() {
        return sysKey;
    }

    public void setSysKey(String sysKey) {
        this.sysKey = sysKey;
    }

    @Basic
    @Column(name = "sys_value")
    public String getSysValue() {
        return sysValue;
    }

    public void setSysValue(String sysValue) {
        this.sysValue = sysValue;
    }

    @Basic
    @Column(name = "key_type")
    public String getKeyType() {
        return keyType;
    }

    public void setKeyType(String keyType) {
        this.keyType = keyType;
    }

    @Basic
    @Column(name = "key_sub_type")
    public String getKeySubType() {
        return keySubType;
    }

    public void setKeySubType(String keySubType) {
        this.keySubType = keySubType;
    }

    @Basic
    @Column(name = "comment")
    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SunSystemEntity that = (SunSystemEntity) o;
        return sysId == that.sysId &&
                Objects.equals(sysKey, that.sysKey) &&
                Objects.equals(sysValue, that.sysValue) &&
                Objects.equals(keyType, that.keyType) &&
                Objects.equals(keySubType, that.keySubType) &&
                Objects.equals(comment, that.comment);
    }

    @Override
    public int hashCode() {
        return Objects.hash(sysId, sysKey, sysValue, keyType, keySubType, comment);
    }
}
